package com.atguigu.service.impl;

import com.atguigu.bean.User;
import com.atguigu.dao.UserDao;
import com.atguigu.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.io.IOException;



@Service
public class UserServiceImpl implements UserService {


	@Autowired
	private UserDao userDao;

	@Transactional
	@Override
    public int addUser(User user) throws IOException {
		int i = userDao.addUser(user);
		int a=100/(user.getMoney());
		return i;
    }
}
